/*
 * Copyright 2017 StreamSets Inc.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

/**
 * Left, Right and Below tabs were removed from Bootstrap 3, but you can add custom CSS to achieve this.
 * http://stackoverflow.com/questions/18432577/stacked-tabs-in-bootstrap-3
 */

.tabs-left {
  > .nav-tabs {
    border-bottom: 0;
  }
}

.tab-content > .tab-pane,
.pill-content > .pill-pane {
  display: none;
}

.tab-content > .active,
.pill-content > .active {
  display: block;
}

.tabs-left {
  > .nav-tabs > li {
    float: none;

    > a {
      min-width: 74px;
      margin-right: 0;
      margin-bottom: 3px;
    }
  }

  > .tab-content {
    float: right;
    width: calc(~"100% - 170px");
  }

  &.icon-only {
    > .nav-tabs > li {
      > a {
        min-width: 0;
      }
    }

    > .tab-content {
      width: calc(~"100% - 60px");
    }
  }
}

.tabs-left > .nav-tabs {
  float: left;
  border-right: 1px solid #ddd;

  > li > a {
    margin-right: -1px;
    -webkit-border-radius: 4px 0 0 4px;
    -moz-border-radius: 4px 0 0 4px;
    border-radius: 4px 0 0 4px;

    &:hover, &:focus {
      border-color: #eee #ddd #eee #eee;
    }
  }

  > .active a {
    &, &:hover, &:focus {
      border-color: #ddd transparent #ddd #ddd;
      border-right-color: #fff;
      box-shadow: -2px 2px 3px rgba(0,0,0,0.05);
      border-radius: 3px 0 0 3px;

      &:before {
        position: absolute;
        top: 0;
        left: 0;
        bottom: 0;
        width: 3px;
        content: "";
        background-color: @streamsets-color;
        border-radius: 3px 0 0 3px;
      }

    }
  }
}

.tabs-top >.nav-tabs {
  > .active a {
    &, &:hover, &:focus {
      border-bottom-color: #fff;
      border-radius: 3px 3px 0 0;

      &:before {
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        height: 3px;
        content: "";
        background-color: @streamsets-color;
        border-radius: 3px 3px 0 0;
      }

    }
  }
}
